<template>
  <div class="reportDetail-content">
          <div class="reportDetailBox">
                <div class="headerBox">
                      <div class="line"></div>
                      <div class="title">检测报告</div>
                </div>  
                <vue-office-docx v-if="report.endsWith('.docx')" :src="report" />
                <vue-office-excel v-if="report.endsWith('.xlsx')" :src="report"  />
                <vue-office-pdf v-if="report.endsWith('.pdf')" :src="report"  />
                <div class="bottomBtnCss">
                  <el-button @click="goBackBtn">返回</el-button>
                 </div>
          </div>  
  </div>
</template>

<script>
  export default {
    data() {
      return {
         report:''
      };
    },
    created() {
         this.report = this.$route.query.report
    },
    methods: {

        goBackBtn(){
          this.$router.back()
        },
    }
  };
</script>
<style lang="scss" scoped>
         .display-fx-center{
             display: flex;
             align-items: center;
         }
         .reportDetail-content{
              overflow-y: auto;
              position: relative;
              background-color: #fff;
              padding: 40px 20px;
              border-radius: 10px;
              height: calc( 100vh - 66px - 40px);
             .reportDetailBox{
                    padding-bottom:40px;

              }
           .headerBox{
                font-size: 16px;
                color: #484848;
                font-weight: bold;
                // margin-top:40px;/
                margin-bottom:15px;
                @extend .display-fx-center;
                .line{
                  width: 4px;
                  height: 12px;
                  background: #5D85FF;
                  border-radius: 6px 6px 6px 6px;
                  margin-right:6px;
                }
             }
          }
          .bottomBtnCss{
            // margin-top: auto;
            text-align: right;
            position: fixed;
            bottom: 40px;
            right: 40px; 
        }     
</style>
